package com.nxn.dinner.model;

import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.nxn.core.model.IdEntity;
import com.nxn.core.model.User;

@Entity
@Table(name = "t_vegetable_type")
public class VegetableType extends IdEntity {
	private String code;
	private String name;
	private String description;
	private int serial;
	private boolean enable;
	private User editor;
	private Timestamp editTime;
	
	@Column(name = "code")
	public String getCode() {
		return code;
	}
	@Column(name = "name")
	public String getName() {
		return name;
	}
	@Column(name = "description")
	public String getDescription() {
		return description;
	}
	@Column(name = "serial")
	public int getSerial() {
		return serial;
	}
	@Column(name = "enable")
	public boolean getEnable() {
		return enable;
	}
	@ManyToOne(cascade={CascadeType.MERGE})
	public User getEditor() {
		return editor;
	}
	@Column(name = "editTime")
	public Timestamp getEditTime() {
		return editTime;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public void setSerial(int serial) {
		this.serial = serial;
	}
	public void setEnable(boolean enable) {
		this.enable = enable;
	}
	public void setEditor(User editor) {
		this.editor = editor;
	}
	public void setEditTime(Timestamp editTime) {
		this.editTime = editTime;
	}
	
}
